#include "Projectile.h"

Projectile::Projectile(Vector2D v, Vector2D dir) : GameObject(v)
{
	direction = dir;
}


Projectile::~Projectile(void)
{
}

bool Projectile::Update(float _dt)
{
	if(destroy)
		return true;

	position += direction * speed;

	return false;
}

bool Projectile::Render()
{
	if(destroy)
		return true;

	if(sprite)
		sprite->RenderEx(position.x, position.y, -atan2(position.x, position.y) + M_PI_2);

	return false;
}
